﻿@model OnlineStore.Web.Models.ProductDetails.ProductDetailsModel

@{
    ViewBag.Title = "title";
    Layout = "_Layout1";
}

<link href="~/css/shopdetail.css" rel="stylesheet" />
<!-----商品详情部分------->
<div class="shopdetails container">
    <!-------放大镜-------->
    <div id="leftbox">
        <div id="showbox">
            <img src="@Model.product.ImageUrl" width="250" height="400" />

        </div><!--展示图片盒子-->
        <div id="showsum"></div><!--展示图片里边-->

    </div>
    <!----中间----->
    <div class="centerbox ">
        <p class="imgname">@Model.product.Name</p>
        <p class="Aprice">价格：<samp></samp></p>
        <p class="price">促销价：<samp>@Model.product.Price</samp></p>
        <p class="youhui">店铺优惠：<samp>暂无优惠</samp></p>
        <p class="kefu">客服：YMccc</p>
        <ul>
            <li class="kuanshi">款式：</li>
            <li class="now shopimg"><img src=@Model.product.ImageUrl width="45"></li>
        </ul>
        <div class="clear"></div>
        <form asp-action="AddToCart" asp-controller="Product" method="post">
            <p class="buy">
                <a id="firstbuy">立即购买</a>
                <input type="hidden" name="id" value="@Model.product.Id"/>
                <input class="btn btn-primary" type="submit" value="加入购物车" />
            </p>
        </form>
        <div class="clear"></div>
        <p class="fuwu">服务承诺：</p>
        <p class="pay">支付方式：</p>
    </div>

    <!-----右边------->
    <div class="rightbox">
        <p class="name">——热卖商品</p>
        @foreach (var item in Model.products)
        {
            <img src=@item.ImageUrl width="130" height="180">
            <p>@item.Price</p>

        }

    </div>

</div>
<!-----商品详情部分结束------->
<!-----商品详情评价部分------->
<div class="evaluate container">


    <div class="tabbedPanels">
        <ul class="tabs">
            <li><a href="#panel02" class="active"><span>商品详情</span></a></li>
            <li><a href="#panel02" class="active"><span>累计评价</span>@Model.product.Comments.Count<span></span>+</a></li>
        </ul>

        <div class="panelContainer">
            <div class="panel" id="panel01">
                <p class="sell">商品描述</p>
                <p>@Model.product.Description</p>
                <p></p>
                <p class="sell">整体款式</p>
                @foreach (var item in Model.product.ProductImages)
                {
                    <img src=@item.Url>
                }
                <div class="clear"></div>
            </div>

            <div class="panel" id="panel02">
                <p class="sell">买家评价</p>
                <img src="">
                <p class="judge">全部评价(20)</p>


                @foreach (var item in Model.product.Comments)
                {
                    <div class="judge01">
                        <div class="idimg"></div>
                        <div class="write">
                            @{
                                var name = @item.User.Name;
                            }
                            <p class="idname">(@name[0]"****"@item.User.Name[name.Length - 1])</p> 
                           <p >@item.Description</p>
                        </div>
                    </div>
                }

                <div class="clear"></div>
            </div>
            <div class="clear"></div>


        </div>

    </div>
</div>
